Skip to content

feat(statics): add Pearl to statics#9347

Open
manojkumar138 wants to merge 1 commit into
masterfrom
feat/prl/pr1-statics
Open

feat(statics): add Pearl to statics#9347
manojkumar138 wants to merge 1 commit into
masterfrom
feat/prl/pr1-statics

Conversation

@manojkumar138

@manojkumar138 manojkumar138 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Defines Pearl's coin identity in @bitgo/statics. No utxo-lib changes — Pearl is intended to be served through the @bitgo/wasm-utxo path, matching the wasm-only profile already used by ims-utxo.

4 files, 48 insertions.

Chain Type

UTXO — Taproot-only (BIP-340 Schnorr, BIP-341 script-path with a NUMS internal key). Pearl is a btcd fork.

@bitgo/wasm-utxo is authoritative on script-type support and restricts Pearl to Taproot:

btc   -> [ p2sh, p2shP2wsh, p2wsh, p2trLegacy, p2trMusig2 ]
ltc   -> [ p2sh, p2shP2wsh, p2wsh ]
pearl -> [ p2trLegacy, p2trMusig2 ]

Coin Codes & Tickers

Variant Coin code Ticker
Mainnet pearl PEARL
Testnet tpearl TPEARL

Names match @bitgo/wasm-utxo (coinNames: [..., "pearl", "tpearl"]) and indexer-utxo (CoinSymbol.pearl / CoinSymbol.tpearl).

Network Parameters

Parameter Mainnet Testnet
Bech32m HRP prl tprl
BIP-44 coin type 808276 1
Derivation path m/86'/808276'/0' m/86'/1'/0'
Decimals 8 8

Changes

File Change
src/base.ts CoinFamily.PEARL, UnderlyingAsset.PEARL
src/networks.ts Pearl / PearlTestnet classes + Networks.main/Networks.test entries
src/utxo.ts pearl / tpearl coin entries, explicit PEARL / TPEARL suffixes, MULTISIG + BULK_TRANSACTION + DISTRIBUTED_CUSTODY
test/unit/fixtures/expectedColdFeatures.ts both names added to justMultiSig

On utxolibName

UtxoNetwork requires a utxolibName: string, so the classes set 'pearl' / 'tpearl' — the wasm CoinNames. With no utxo-lib network registered, these do not resolve to a utxolib.networks entry. That is intentional under the wasm-only approach, and the one structural consequence is noted below.

Verification

Module Result
statics 32180 passing
utxo-lib 4249 passing
utxo-core 239 passing
abstract-utxo 1545 passing
utxo-bin 237 passing

All build clean (statics, utxo-lib, utxo-core, abstract-utxo, utxo-bin, sdk-core); prettier clean. Rebased onto current master.

Known consequence of the wasm-only approach

Nothing in this PR is blocked, but for the record: sdk-core's abstractUtxoCoinUtil.ts resolves statics' utxolibName into a utxo-lib network —

const network = utxolib.networks[coin.network.utxolibName as utxolib.NetworkName];

— in both getUtxoCoinScriptTypes2Of3() and getUtxoCoinScriptTypesForWalletType(). For Pearl that yields undefined and then throws TypeError: invalid network.

Not reachable today: no SDK coin class exists for Pearl, and the sdk-core tests covering those functions use a hardcoded coin list (btc, ltc, doge) rather than enumerating statics. It becomes reachable when the coin class lands, so those two functions need a wasm-backed path (or a Pearl guard) before Pearl is wired into wallet/address flows.

The good news for that follow-up: abstract-utxo is already almost entirely wasm-backed — 37 files import @bitgo/wasm-utxo, and the only 3 mentioning utxolib are a deprecation comment in abstractUtxoCoin.ts ("will be removed when we drop support for utxolib"), a comment in unspent.ts, and BTC-specific inscriptionBuilder.ts. Coin classes carry a name, not a Network, so a wasm-only Pearl coin class looks feasible without reintroducing utxo-lib.

Dependencies

Already merged upstream:

  • BitGo/wasm-utxo#328 — Pearl network support ✅
  • BitGo/indexer-utxo#957 — Pearl coin support ✅

Related

🤖 Generated with Claude Code

@manojkumar138
manojkumar138 force-pushed the feat/prl/pr1-statics branch from d507bc6 to 0f546d8 Compare July 24, 2026 11:27
@manojkumar138 manojkumar138 changed the title feat(statics): add Pearl (PRL) to statics and utxo-lib networks feat(statics): add Pearl to statics and utxo-lib networks Jul 24, 2026
@manojkumar138
manojkumar138 force-pushed the feat/prl/pr1-statics branch 4 times, most recently from e940684 to 563cbd8 Compare July 24, 2026 11:53
@linear-code

linear-code Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

CECHO-1780

@manojkumar138
manojkumar138 force-pushed the feat/prl/pr1-statics branch 7 times, most recently from 96342d0 to 8317443 Compare July 25, 2026 20:12
@manojkumar138

Copy link
Copy Markdown
Contributor Author

@claude review

@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Claude finished @manojkumar138's task —— View job


Code Review - Pearl (PEARL) Integration

✅ Completed Reviews

1. Base Configuration (modules/statics/src/base.ts)

  • Pearl coin family properly added to CoinFamily enum (line 113)
  • Pearl underlying asset properly added to UnderlyingAsset enum (line 1688)
  • Integration follows existing patterns correctly

2. Network Classes (modules/statics/src/networks.ts)

  • Pearl mainnet network class properly implemented (lines 1434-1439)
  • PearlTestnet network class properly implemented (lines 1441-1446)
  • Both implement UtxoNetwork interface correctly
  • Networks registered in Networks.main and Networks.test objects
  • Explorer URLs set to undefined (appropriate for new network)

3. UTXO Coin Definitions (modules/statics/src/utxo.ts)

  • PEARL_FEATURES properly defined (lines 146-151) with appropriate feature set:
    • All default UTXO features included
    • MULTISIG, BULK_TRANSACTION, DISTRIBUTED_CUSTODY added
  • Pearl mainnet entry properly configured (lines 329-339):
    • UUID: 4518a5b9-00d3-476e-bc40-d3f87eb82250
    • Name: pearl / Display: Pearl
    • Uses correct network reference and asset
    • Suffix: PEARL
  • Pearl testnet entry properly configured (lines 340-350):
    • UUID: 5d88723a-7e86-43c7-9fb1-f4cee7abc48f
    • Name: tpearl / Display: Testnet Pearl
    • Suffix: TPEARL

4. UTXO-lib Network Configuration (modules/utxo-lib/src/networks.ts)

  • Pearl coin properly added to coins object (line 36)
  • NetworkName type extended with pearl and tpearl (lines 59-60)
  • Pearl mainnet network properly configured (lines 334-342):
    • Message prefix: \x18Pearl Signed Message:\n
    • Bech32 HRP: prl ✅ (matches spec)
    • Standard Bitcoin-compatible key derivation
  • Pearl testnet network properly configured (lines 343-351):
    • Bech32 HRP: tprl ✅ (matches spec)
    • Standard testnet configuration
  • getMainnet() function updated to handle Pearl networks (lines 436-438)
  • isPearl() helper function added (lines 563-565)
  • Taproot support properly enabled (line 598) ✅
  • SegWit support properly enabled (line 592) ✅

5. Test Fixtures and Validation

  • Comprehensive address test fixtures present for both networks
  • Pearl mainnet addresses use prl1 prefix ✅
  • Pearl testnet addresses use tprl1 prefix ✅
  • Address formats properly support:
    • P2PKH (legacy addresses)
    • P2WPKH (SegWit v0)
    • P2TR (Taproot) ✅
    • P2TR-MuSig2 (Taproot multisig) ✅
  • PSBT test fixtures comprehensive, including unsigned/half-signed/full-signed
  • Format fixtures for address display

🎯 Key Validation Points ✅

  1. Taproot-only Focus: Pearl properly configured as Taproot-enabled coin
  2. Bech32m Addresses: Correct HRP prefixes (prl/tprl) implemented
  3. Network Parameters: Standard Bitcoin-compatible parameters used
  4. Feature Set: Appropriate features enabled (multisig, bulk transactions, distributed custody)
  5. Test Coverage: Comprehensive test fixtures for all address types and transaction formats
  6. Integration Consistency: All components properly reference each other

📊 Review Summary

Status: ✅ APPROVED

The Pearl (PEARL) cryptocurrency integration is well-implemented and complete. The implementation properly follows BitGo's established patterns and includes:

  • Complete statics configuration across all required modules
  • Proper UTXO network definitions with Taproot support
  • Comprehensive test coverage with correct address formats
  • Consistent naming and referencing across all components

The integration correctly implements Pearl as a Taproot-enabled UTXO coin with bech32m addressing (prl/tprl prefixes) and includes all necessary features for BitGo wallet functionality.

No issues identified. Ready for merge.

@manojkumar138
manojkumar138 marked this pull request as ready for review July 26, 2026 12:02
@manojkumar138
manojkumar138 requested review from a team as code owners July 26, 2026 12:02
@manojkumar138
manojkumar138 requested a review from Copilot July 26, 2026 12:02
@manojkumar138
manojkumar138 marked this pull request as draft July 26, 2026 12:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces Pearl (pearl / tpearl) as a recognized UTXO network across BitGoJS’ statics + UTXO stack (statics, utxo-lib, utxo-core, utxo-bin, abstract-utxo tests), including Taproot-only wallet script-type enforcement to match @bitgo/wasm-utxo behavior.

Changes:

  • Adds Pearl network definitions (mainnet/testnet) and detection helpers in @bitgo/utxo-lib, including Taproot-only script-type gating in outputScripts.isSupportedScriptType.
  • Registers Pearl coin metadata in @bitgo/statics (family/asset/network/utxo coin entries + expectedColdFeatures).
  • Updates dust threshold logic, CLI network parsing order, tests, and extensive address/PSBT fixtures; bumps @bitgo/wasm-utxo to ^4.27.0 across affected modules.

Reviewed changes

Copilot reviewed 92 out of 93 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
yarn.lock Bumps @bitgo/wasm-utxo and updates transitive lock entries.
modules/utxo-staking/package.json Bumps @bitgo/wasm-utxo to ^4.27.0.
modules/utxo-ord/package.json Bumps @bitgo/wasm-utxo to ^4.27.0.
modules/utxo-descriptors/package.json Bumps @bitgo/wasm-utxo to ^4.27.0.
modules/utxo-core/package.json Bumps @bitgo/wasm-utxo to ^4.27.0.
modules/utxo-bin/package.json Bumps @bitgo/wasm-utxo to ^4.27.0.
modules/abstract-utxo/package.json Bumps @bitgo/wasm-utxo to ^4.27.0.
modules/statics/src/base.ts Adds CoinFamily.PEARL and UnderlyingAsset.PEARL.
modules/statics/src/networks.ts Adds Pearl mainnet/testnet network objects to Networks.
modules/statics/src/utxo.ts Adds pearl/tpearl UTXO coin entries and feature set.
modules/statics/test/unit/fixtures/expectedColdFeatures.ts Adds pearl/tpearl to expected cold-feature fixtures.
modules/utxo-lib/src/networks.ts Adds pearl/tpearl networks, NetworkName union updates, and helpers (isPearl, segwit/taproot support).
modules/utxo-lib/src/bitgo/outputScripts.ts Enforces Taproot-only script type support for Pearl via isSupportedScriptType.
modules/utxo-lib/src/bitgo/transaction.ts Enables transaction/PSBT factory support for networks.pearl.
modules/utxo-core/src/dustThreshold.ts Treats Pearl like BTC-group for dust relay limit and spend size.
modules/utxo-core/test/dustThreshold.ts Adds Pearl expected dust-threshold test vectors.
modules/utxo-bin/src/args/parseNetwork.ts Adds Pearl to the CLI network ordering (mainnet group).
modules/utxo-lib/test/networks.ts Extends network property-sharing groups and feature expectation table for Pearl.
modules/utxo-lib/test/bitgo/outputScripts.ts Adds expected script types for Pearl (p2tr, p2trMusig2).
modules/utxo-lib/test/integration_local_rpc/parse.ts Skips Pearl in regtest fixture suite until generator supports it.
modules/utxo-lib/test/fixtures_thirdparty/parse.ts Excludes Pearl from third-party fixture parsing.
modules/utxo-lib/test/fixtures_thirdparty/download.ts Excludes Pearl from third-party fixture downloads.
modules/utxo-lib/test/bitgo/psbt/Psbt.ts Skips a p2ms-only extraction suite for Pearl.
modules/utxo-lib/test/bitgo/psbt/SignVerifyLegacy.ts Skips legacy PSBT signing suite for taproot-only Pearl.
modules/utxo-lib/test/address/fixtures/pearl.json Adds Pearl address vectors.
modules/utxo-lib/test/address/fixtures/tpearl.json Adds Pearl testnet address vectors.
modules/utxo-lib/test/bitgo/fixtures/psbt/psbt.pearl.unsigned.json Adds Pearl PSBT fixture (unsigned).
modules/utxo-lib/test/bitgo/fixtures/psbt/psbt.pearl.halfsigned.json Adds Pearl PSBT fixture (half-signed).
modules/utxo-lib/test/bitgo/fixtures/psbt/psbt-lite.pearl.unsigned.json Adds Pearl “lite” PSBT fixture (unsigned).
modules/utxo-lib/test/bitgo/fixtures/psbt/psbt-lite.pearl.halfsigned.json Adds Pearl “lite” PSBT fixture (half-signed).
modules/abstract-utxo/test/unit/coins.ts Documents Pearl networks as lacking coin classes yet (undefined).
modules/abstract-utxo/test/unit/util/utxoCoins.ts Adds hasUtxoCoinForNetwork predicate for tests.
modules/abstract-utxo/test/unit/transaction/fixedScript/parsePsbt.ts Filters AcidTest suite by hasUtxoCoinForNetwork.
modules/utxo-bin/test/fixtures/formatAddress/pearl_p2pkh_default_1LCVrCgbT26Ui1QyrhaGvvhrkVdDRAXxtt.txt Adds Pearl formatAddress fixture (p2pkh).
modules/utxo-bin/test/fixtures/formatAddress/pearl_p2wkh_default_prl1q62tshlryz9lrjlw9edaf4l5l3v3deg03gw29k2.txt Adds Pearl formatAddress fixture (p2wkh).
modules/utxo-bin/test/fixtures/formatAddress/pearl_p2tr_default_prl1p8gv9m64s539mycj4m29wu8thy5n3y6u36xs58wq3yezrmqygwfns2yff0j.txt Adds Pearl formatAddress fixture (p2tr).
modules/utxo-bin/test/fixtures/formatAddress/pearl_p2trMusig2_default_prl1p5xqvqger0zdpcq6s3jznfz352exhk356p9hml6c69matmggrve9sq7apju.txt Adds Pearl formatAddress fixture (p2trMusig2).
modules/utxo-bin/test/fixtures/formatAddress/tpearl_p2pkh_default_mziT9FmaG3XjV7tbaGYekqvBcVDvGnY3EZ.txt Adds tpearl formatAddress fixture (p2pkh).
modules/utxo-bin/test/fixtures/formatAddress/tpearl_p2wkh_default_tprl1q62tshlryz9lrjlw9edaf4l5l3v3deg03lufv9q.txt Adds tpearl formatAddress fixture (p2wkh).
modules/utxo-bin/test/fixtures/formatAddress/tpearl_p2tr_default_tprl1p8gv9m64s539mycj4m29wu8thy5n3y6u36xs58wq3yezrmqygwfnsptdhs8.txt Adds tpearl formatAddress fixture (p2tr).
modules/utxo-bin/test/fixtures/formatAddress/tpearl_p2trMusig2_default_tprl1p5xqvqger0zdpcq6s3jznfz352exhk356p9hml6c69matmggrve9st3eldf.txt Adds tpearl formatAddress fixture (p2trMusig2).
modules/utxo-bin/test/fixtures/formatAddress/bitcoin_p2pkh_default_1LCVrCgbT26Ui1QyrhaGvvhrkVdDRAXxtt.txt Updates network candidate list to include Pearl.
modules/utxo-bin/test/fixtures/formatAddress/bitcoin_p2pkh_default_1LCVrCgbT26Ui1QyrhaGvvhrkVdDRAXxtt.all.txt Updates converted network list to include Pearl/tpearl.
modules/utxo-bin/test/fixtures/formatAddress/bitcoin_p2sh_default_361UWADXqgPsdf8L5Jga6GNPauMuBtT1eW.txt Updates network candidate list to include Pearl.
modules/utxo-bin/test/fixtures/formatAddress/bitcoin_p2sh_default_361UWADXqgPsdf8L5Jga6GNPauMuBtT1eW.all.txt Updates converted network list to include Pearl/tpearl.
modules/utxo-bin/test/fixtures/formatAddress/bitcoin_p2shP2wsh_default_33qtbAwm4ooBtMQenssbqDE1J4gSMMBRnb.txt Updates network candidate list to include Pearl.
modules/utxo-bin/test/fixtures/formatAddress/bitcoin_p2shP2wsh_default_33qtbAwm4ooBtMQenssbqDE1J4gSMMBRnb.all.txt Updates converted network list to include Pearl/tpearl.
modules/utxo-bin/test/fixtures/formatAddress/bitcoin_p2tr_default_bc1p8gv9m64s539mycj4m29wu8thy5n3y6u36xs58wq3yezrmqygwfnsjhucex.all.txt Adds Pearl/tpearl conversions for taproot addresses.
modules/utxo-bin/test/fixtures/formatAddress/bitcoin_p2trMusig2_default_bc1p5xqvqger0zdpcq6s3jznfz352exhk356p9hml6c69matmggrve9scdgsyg.all.txt Adds Pearl/tpearl conversions for taproot-musig2 addresses.
modules/utxo-bin/test/fixtures/formatAddress/bitcoin_p2wkh_default_bc1q62tshlryz9lrjlw9edaf4l5l3v3deg034uw28c.all.txt Adds Pearl/tpearl conversions for segwit v0 addresses.
modules/utxo-bin/test/fixtures/formatAddress/bitcoin_p2wsh_default_bc1qeu6xmet5wqslj2w0wac0hx5gj6dupmp869cajrkt3kw6ud3kkecsdzf7hn.all.txt Adds Pearl/tpearl conversions for segwit v0 scripts.
modules/utxo-bin/test/fixtures/formatAddress/testnet_p2pkh_default_mziT9FmaG3XjV7tbaGYekqvBcVDvGnY3EZ.txt Updates candidate network lists to include tpearl where prefixes collide.
modules/utxo-bin/test/fixtures/formatAddress/testnet_p2sh*_default_2M*.txt Updates candidate network lists to include tpearl where prefixes collide.
modules/utxo-bin/test/fixtures/formatAddress/cash_*.all.txt Updates converted network list to include Pearl/tpearl.
modules/utxo-bin/test/fixtures/formatAddress/sv_* Updates network candidate lists to include Pearl/tpearl.
modules/utxo-bin/test/fixtures/formatAddress/bch_* Updates network candidate lists to include Pearl/tpearl.
modules/utxo-bin/test/fixtures/formatAddress/btg_* Updates network candidate lists to include Pearl/tpearl.
modules/utxo-bin/test/fixtures/formatAddress/doge_* Updates network candidate lists to include tpearl.
modules/utxo-bin/test/fixtures/formatAddress/ecash_* Updates network candidate lists to include Pearl/tpearl.
modules/utxo-bin/test/fixtures/formatAddress/litecoinTest_* Updates network candidate lists to include tpearl.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +146 to +151
const PEARL_FEATURES = [
...UtxoCoin.DEFAULT_FEATURES,
CoinFeature.MULTISIG,
CoinFeature.BULK_TRANSACTION,
CoinFeature.DISTRIBUTED_CUSTODY,
];
@manojkumar138
manojkumar138 marked this pull request as ready for review July 26, 2026 12:08

@OttoAllmendinger OttoAllmendinger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove utxo-lib changes

@manojkumar138
manojkumar138 force-pushed the feat/prl/pr1-statics branch from 8317443 to 8a68ca6 Compare July 26, 2026 18:14
Define Pearl (PEARL/TPEARL) coin identity in @bitgo/statics: CoinFamily,
UnderlyingAsset, the Pearl/PearlTestnet network classes and the pearl and
tpearl coin entries.

Pearl is a taproot-only UTXO chain (btcd fork) using BIP-340 Schnorr
signatures and BIP-341 script-path spending. It is backed by
@bitgo/wasm-utxo, which has carried pearl and tpearl in CoinName since
4.27.0.

No @bitgo/utxo-lib network is registered. Pearl is intended to be served
through the wasm-utxo path, matching the wasm-only profile already used
by ims-utxo, so utxolibName names the wasm CoinName rather than a
utxo-lib network entry.

TICKET: CECHO-1780

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@manojkumar138
manojkumar138 force-pushed the feat/prl/pr1-statics branch from 8a68ca6 to 6651eb1 Compare July 26, 2026 18:15
@manojkumar138 manojkumar138 changed the title feat(statics): add Pearl to statics and utxo-lib networks feat(statics): add Pearl to statics Jul 26, 2026
@manojkumar138

Copy link
Copy Markdown
Contributor Author

@OttoAllmendinger that all matches what's here now — this PR touches modules/statics only:

Your note Status in this PR
no descriptors 0 files (utxo-descriptors never touched)
no ordinals 0 files (utxo-ord)
utxo-core does not need support 0 files — dust-policy change dropped
skip utxo-bin 0 files — networkOrder change dropped
just the basic fixed-script surface in abstract-utxo 0 files here; that's the next PR

So nothing to undo. The utxo-core and utxo-bin changes only existed because they referenced utxolib.networks.pearl, so they went out with the utxo-lib network.

Scoping the follow-up to your last point — basic fixed-script wallet surface in abstract-utxo, nothing else:

  • names.ts — register pearl / tpearl
  • impl/pearl/Prl / Tprl classes, taproot-only so exposing just p2tr / p2trMusig2 rather than inheriting AbstractUtxoCoin's defaults
  • the two sdk-core abstractUtxoCoinUtil.ts helpers that resolve utxolibName into a utxo-lib network and would throw TypeError: invalid network for Pearl

No descriptors, no ordinals, no utxo-core, no utxo-bin, no inscriptionBuilder.

I'll hold off until this one merges so the statics entry exists first — shout if you'd rather I stack it on this branch now.

@manojkumar138

Copy link
Copy Markdown
Contributor Author

@OttoAllmendinger dropped the utxo-lib changes — PR is now statics-only: 4 files, 48 insertions, rebased onto current master.

Blockers: none for this PR

I checked this empirically rather than by inspection — stripped the utxo-lib changes and ran the full chain:

Module Result
statics 32180 passing
utxo-lib 4249 passing
utxo-core 239 passing
abstract-utxo 1545 passing
utxo-bin 237 passing

All build clean. Nothing cross-checks statics' utxolibName against the utxo-lib network registry, so a statics coin with no corresponding network is fine today.

Everything else in the previous revision existed only to support the utxo-lib network, so it all went with it: the utxo-core dust policy and utxo-bin networkOrder entries (both referenced utxolib.networks.pearl), the abstract-utxo test hooks, the address/PSBT/formatAddress fixtures, and the @bitgo/wasm-utxo ^4.21.1^4.27.0 bump across 6 packages — that bump was needed only because widening utxo-lib's NetworkName broke assignability against wasm's. It can come back in whichever PR actually needs wasm's Pearl support.

One thing to be aware of

Not a blocker here, but it's the thing that bites later. sdk-core/src/bitgo/utils/abstractUtxoCoinUtil.ts resolves statics' utxolibName straight into a utxo-lib network:

const network = utxolib.networks[coin.network.utxolibName as utxolib.NetworkName];

in both getUtxoCoinScriptTypes2Of3() and getUtxoCoinScriptTypesForWalletType(). For Pearl that's undefined, and I confirmed the concrete failure:

statics pearl OK: utxolibName = "pearl"
utxolib.networks[utxolibName] = undefined
THROWS: TypeError: invalid network

It isn't reached today — no SDK coin class exists for Pearl, and the sdk-core tests covering those two functions use a hardcoded list (btc, ltc, doge) rather than enumerating statics. It becomes reachable the moment the coin class lands, so those two need a wasm-backed path (or a Pearl guard) before Pearl is wired into wallet/address flows.

Also worth flagging since it's unavoidable rather than a choice: UtxoNetwork requires utxolibName: string, so the network classes have to name something. I set 'pearl' / 'tpearl' (the wasm CoinNames), which reads sensibly but is precisely what makes the lookup above return undefined.

This looks tractable end-to-end

While tracing the above I checked how coupled abstract-utxo still is, and it's encouraging: 37 files import @bitgo/wasm-utxo, and only 3 mention utxolib — a deprecation comment in abstractUtxoCoin.ts ("will be removed when we drop support for utxolib"), a comment in unspent.ts, and BTC-specific inscriptionBuilder.ts. Coin classes carry a name, not a Network (Btc is just readonly name: UtxoCoinName = 'btc').

So a wasm-only Pearl coin class looks feasible without reintroducing utxo-lib — the work being names.ts registration plus the two sdk-core helpers above.

@manojkumar138
manojkumar138 requested a review from Copilot July 26, 2026 18:22
@manojkumar138

Copy link
Copy Markdown
Contributor Author

@claude review

@github-actions

github-actions Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Claude encountered an error —— View job


Code Review - Pearl (PEARL) Integration

Todo List:

  • Review base configuration changes (modules/statics/src/base.ts)
  • Review network definitions (modules/statics/src/networks.ts)
  • Review UTXO coin entries (modules/statics/src/utxo.ts)
  • Review test fixtures (modules/statics/test/unit/fixtures/expectedColdFeatures.ts)
  • Validate Pearl specifications against PR requirements
  • Check for code quality issues and best practices
  • Provide final review summary

Job run

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (2)

modules/statics/src/utxo.ts:151

  • PEARL_FEATURES repeats CoinFeature.MULTISIG, which is already included in UtxoCoin.DEFAULT_FEATURES. This can leave duplicate entries in the coin's features array, which is easy to miss and can cause brittle equality/serialization behavior downstream.
const PEARL_FEATURES = [
  ...UtxoCoin.DEFAULT_FEATURES,
  CoinFeature.MULTISIG,
  CoinFeature.BULK_TRANSACTION,
  CoinFeature.DISTRIBUTED_CUSTODY,
];

modules/statics/src/networks.ts:1445

  • Same as mainnet: since Pearl testnet is wasm-only and not present in @bitgo/utxo-lib networks, it’s worth documenting that utxolibName here refers to the wasm coin name, not an actual utxo-lib network key.
  name = 'PearlTestnet';
  family = CoinFamily.PEARL;
  utxolibName = 'tpearl';
  explorerUrl = undefined;

Comment on lines +1435 to +1438
name = 'Pearl';
family = CoinFamily.PEARL;
utxolibName = 'pearl';
explorerUrl = undefined;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants